package plot;

/**
 *
 * @author Evangelista
 */
public abstract class GoogleMap {
    
    private final static String INIT_HEADER = "http://maps.google.com/maps/api/staticmap?";
    
    private static String center = "RJ"     ;
    private static String zoom   = "14"     ;
    private static String size   = "640"    ;
    private static String type   = "roadmap";
    
    public static void set_center( String center ){ GoogleMap.center = center                ; }
    public static void set_zoom  ( int zoom      ){ GoogleMap.zoom   = String.valueOf( zoom ); }
    public static void set_size  ( int size      ){ GoogleMap.size   = String.valueOf( size ); }
    public static void set_type  ( String type   ){ GoogleMap.type   = type                  ; }
    
    public static String GET_INIT_HEADER(){ return GoogleMap.INIT_HEADER; }
    public static String get_center     (){ return GoogleMap.center     ; }
    public static String get_zoom       (){ return GoogleMap.zoom       ; }
    public static String get_size       (){ return GoogleMap.size       ; }
    public static String get_type       (){ return GoogleMap.type       ; }
    
    public static String generate_final_map_url( int zoom, int size ){
        set_center( PlotDataSet.get(0).get_lat_lng_pair() );
        set_zoom( zoom );
        set_size( size );
        
        return
                GoogleMap.GET_INIT_HEADER() +
                "&center=" +
                GoogleMap.get_center() +
                "&zoom=" +
                GoogleMap.get_zoom() +
                "&size=" +
                GoogleMap.get_size() + "x" + GoogleMap.get_size() +
                "&maptype=" +
                GoogleMap.get_type() +
                PlotDataSet.get_markers() +
                "&sensor=false";
    }
    
}
